import request from "@/utils/request";

// 查询乡村数据列表
export function listVillage(query) {
  return request({
    url: "/route/village/list",
    method: "get",
    params: query,
  });
}

// 查询乡村数据详细
export function getVillage(id) {
  return request({
    url: "/route/village/info",
    method: "get",
    params: { id: id },
  });
}

// 新增乡村数据
export function addVillage(data) {
  return request({
    url: "/route/village/add",
    method: "post",
    data: data,
  });
}

// 修改乡村数据
export function updateVillage(data) {
  return request({
    url: "/route/village/edit",
    method: "put",
    data: data,
  });
}

// 删除乡村数据
export function delVillage(id) {
  return request({
    url: "/route/village/" + id,
    method: "delete",
  });
}

// 导出乡村数据
export function exportVillage(query) {
  return request({
    url: "/route/village/export",
    method: "get",
    params: query,
  });
}